/**
*┌──────────────────────────────────────────────────────────────┐
*│　描    述：SysUser服务接口                                                    
*│　作    者：sys                                              
*│　创建时间：2020-12-02 14:55:26   
*│　说    明：代码生成器生成   
*└──────────────────────────────────────────────────────────────┘
*/
using Microsoft.AspNetCore.Http;
using SXFramWork.Core;
using SXFramWork.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace SXFramWork.Service
{
    /// <summary>
	/// SysUser服务接口
	/// </summary>
    public interface ISysUserService
    {
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> Query(UserQueryModel model);

        Task<IApiResult> Add(UserAddModel model);

        /// <summary>
        /// 查询指定账户权限列表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<string>> QueryPermissionList(string userId);

        /// <summary>
        /// 查询账户(缓存优先)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<SysUserEntity> Get(string userId);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IApiResult> Delete(List<string> ids);
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> Update(UserUpdateModel model);
        /// <summary>
        /// 查询单个账户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IApiResult> GetById(string id);

        /// <summary>
        /// 同步账户数据
        /// </summary>
        /// <returns></returns>
        Task<IApiResult> SyncUser();
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="oldpwd"></param>
        /// <param name="newpwd"></param>
        /// <returns></returns>
        Task<IApiResult> EditPwd(string oldpwd, string newpwd);

        Task<IApiResult> UpdateBasic(UpdateModel_Basic model);
        Task<IApiResult<SysUserEntity>> GetUserInfo(string id);
        /// <summary>
        /// 得到所有用户信息的datatable
        /// </summary>
        /// <returns></returns>
        Task<DataTable> QueryUserDTable();
        /// <summary>
        /// Excel导入
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        Task<IApiResult> ImportData(IFormFile file);
    }
}